//
//  XLGLoginCommonProcess.h
//  etionCBLogic
//
//  Created by wjxfhxy on 15-2-4.
//  Copyright (c) 2015年 GuangZhouXuanWu. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "XLGLoginCommonProcessChannelProtocol.h"

/**
 *  此类实现了使用帐号和密码登录的一般流程
 */

extern NSString *const XLGLoginCommonProcessLoginingCheckAccountStatusTip;

extern NSString *const XLGLoginCommonProcessLoginingCheckVersionStatusTip;

extern NSString *const XLGLoginCommonProcessLoginingGetUserInfoStatusTip;

extern NSString *const XLGLoginCommonProcessLoginingGetEnterpriseInfoStatusTip;


typedef NS_ENUM(NSUInteger,OfflineLoginType)
{
    OfflineLoginTypeNone,
    OfflineLoginTypeOffline,
    OfflineLoginTypeChangeOffline
};


/**
 *  登录通用对象，所有登录接口登录成功后，都要把信息转换成此对象才能被处理
 */
@interface XLGLoginAccountInfo : NSObject

@property(nonatomic,retain) NSString *token;
@property(nonatomic,retain) NSString *account;
@property(nonatomic,retain) NSString *loginname;
@property(nonatomic,retain) NSString *mobile;
@property(nonatomic,retain) NSString *password;
@property(nonatomic,retain) NSDictionary *externInfo;

@end

@protocol XLGLoginCommonProcess <XMSBusinessDataRequestManagerDelegate>

@optional

- (void)loginStatus:(NSString *)status;

@end

@interface XLGLoginCommonProcess : XLGManagerService

/**
 *  获取保存在本地的密码
 *
 *  @param szPath 保存路径
 *
 */
- (NSString *)localPassword:(NSString *)szPath;

/**
 *  保存本地密码
 *
 *  @param password 要保存的密码
 *
 */
- (NSInteger)newlocalPassword:(NSString*)password;

- (void)savePasword:(NSString *)password;
@end
